{include file="public/header296" /}
<div class="layui-form" style="padding: 20px 30px 0 0;">
  <div class="layui-form-item">
    <label class="layui-form-label">名称</label>
    <div class="layui-input-inline">
      <input type="text" lay-verify="required|name" name="name" autocomplete="on" placeholder="长度不能超过20个字符" class="layui-input">
    </div>
  </div>
  <div class="layui-form-item">
    <label class="layui-form-label">排序id</label>
    <div class="layui-input-inline">
      <input type="text" name="sort" value="{:sort_id('download_category', 'app')}" class="layui-input" />
    </div>
  </div>
  <div class="layui-form-item">
    <label class="layui-form-label">状态</label>
    <div class="layui-input-inline">
      <input type="checkbox" name="status" value="1" lay-skin="switch" lay-filter="switchStatus" lay-text="显示|隐藏" checked />
    </div>
  </div>
  <div class="layui-form-item layui-hide">
    <input type="button" lay-submit lay-filter="Lay-app-form-submit" id="Lay-app-form-submit" value="添加">
  </div>
</div>
<script>
layui.use(function () {
  var form = layui.form;
  /* 自定义验证规则 */
  form.verify({
    name: function(value){
      if(value.length > 20){
        return '长度不能超过20个字符';
      }
    }
  });
})
</script>
{include file="public/footer" /}